this._positionWindowsFlags = 0;
this._positionWindowsId = 0;
+
+ this._currentLayout = null;
},
setGeometry: function(x, y, width, height) {
clone = null;
this._reservedSlot = clone;
+ this._currentLayout = null;
this.positionWindows(WindowPositionFlags.ANIMATE);
},
this._cursorX = x;
this._cursorY = y;
+ this._currentLayout = null;
this._repositionWindowsId = Mainloop.timeout_add(750,
Lang.bind(this, this._delayedWindowRepositioning));
},
clone.actor.set_position (this._x, this._y);
}
+ this._currentLayout = null;
this.positionWindows(WindowPositionFlags.ANIMATE);
},
// Animate the full-screen to Overview transition.
zoomToOverview : function() {
+ this._currentLayout = null;
+
// Position and scale the windows.
if (Main.overview.animationInProgress)
this.positionWindows(WindowPositionFlags.ANIMATE | WindowPositionFlags.INITIAL);
return lastLayout;
},
+ _rectEqual: function(one, two) {
+ if (one == two)
+ return true;
+
+ return (one.x == two.x &&
+ one.y == two.y &&
+ one.width == two.width &&
+ one.height == two.height);
+ },
+
_computeAllWindowSlots: function(windows) {
let totalWindows = windows.length;
let node = this.actor.get_theme_node();
area.y += closeButtonHeight;
area.height -= closeButtonHeight;
- let layout = this._computeLayout(windows, area, rowSpacing, columnSpacing, captionHeight);
+ if (!this._currentLayout)
+ this._currentLayout = this._computeLayout(windows, area, rowSpacing, columnSpacing, captionHeight);
+
+ let layout = this._currentLayout;
let strategy = layout.strategy;
+ if (!this._rectEqual(area, layout.area)) {
+ layout.area = area;
+ strategy.computeScaleAndSpace(layout);
+ }
+
return strategy.computeWindowSlots(layout, area);
},